home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / length.z / length
Encoding:
Text File  |  1998-10-30  |  2.8 KB  |  78 lines

  1. LENGTH(3I)                                             Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      LLEENNGGTTHH - Returns the number of words transferred
  6.  
  7. SSYYNNOOPPSSIISS
  8.      LLEENNGGTTHH (([II==]_i))
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      UNICOS, UNICOS/mk, and IRIX systems
  12.  
  13. SSTTAANNDDAARRDDSS
  14.      CF90 and MIPSpro 7 Fortran 90 compiler extension to Fortran 90
  15.  
  16. DDEESSCCRRIIPPTTIIOONN
  17.      LLEENNGGTTHH returns the length (in words) of a BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT
  18.      statement transfer.  It accepts the following argument:
  19.  
  20.      _i    Must be a nonnegative integer or Boolean value.  Represents a
  21.           unit number.
  22.  
  23.           If _i is an integer, _i must be of KKIINNDD==88 on UNICOS and UNICOS/mk
  24.           systems, or of KKIINNDD==44 on IRIX systems.
  25.  
  26.      LLEENNGGTTHH is an elemental function.  The name of this intrinsic cannot be
  27.      passed as an argument.
  28.  
  29. NNOOTTEESS
  30.      On UNICOS and UNICOS/mk systems, LLEENNGGTTHH can be called as either an
  31.      external subprogram or as an intrinsic procedure.
  32.  
  33. RREETTUURRNN VVAALLUUEESS
  34.      The value returned is of type default integer.
  35.  
  36.      If the LLEENNGGTTHH function is called during the execution of asynchronous
  37.      I/O with BBUUFFFFEERR IINN or BBUUFFFFEERR OOUUTT, the execution sequence is delayed
  38.      until the transfer is complete.  LLEENNGGTTHH then returns the number of
  39.      words successfully transferred.  On UNICOS and UNICOS/mk systems, the
  40.      length is specified in Cray words.  On IRIX systems, the length is
  41.      specified in the default word size.
  42.  
  43.      Programs that transfer characters or data from a medium that supports
  44.      partial-word I/O cannot detect partial-word transfers.  The return
  45.      value is rounded up to a word count in these cases.
  46.  
  47.      The return value is 0 under the following two conditions:
  48.  
  49.      * An end-of-file or error occurs
  50.  
  51.      * It is following a read or write of a zero-length record.
  52.  
  53.      UUNNIITT(3I) should be used prior to LLEENNGGTTHH to properly distinguish these
  54.      previous two cases.
  55.  
  56. EEXXAAMMPPLLEESS
  57.           PROGRAM PGM
  58.              DIMENSION V(16384)
  59.           10 BUFFER IN (32,-1) (V(1),V(16384))
  60.              X= UNIT(32)
  61.              K= LENGTH(32)
  62.              IF (X .GE. 0.0) GOTO 14
  63.           11 DO 12  I=1,K,1
  64.           12 IF (V(I) .EQ. 'KEY') GOTO 13
  65.              IF (X .EQ. -1.0) GOTO 10
  66.              STOP
  67.           13 ...
  68.              ...
  69.           14 CONTINUE
  70.              END
  71.  
  72. SSEEEE AALLSSOO
  73.      UUNNIITT(3I)
  74.  
  75.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-2138, for the
  76.      printed version of this man page.
  77.  
  78.